<?php

namespace App\Http\Controllers\Home\Index;

use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use App\Http\Controllers\Home\Index\Api\IndexApi;
use App\Http\Controllers\Admin\Articles\Api\ArticlesApi;
use App\Http\Controllers\Admin\Categories\Api\CategoriesApi;
use App\Http\Controllers\Admin\Tags\Api\TagsApi;

class IndexController extends Controller
{   
    /**
     * 加载首页
     * @return 首页页面
     */
    public function index()
    {
        //获取文章列表
        $articlesList = ArticlesApi::getArticlesList('active');

        //***** 分类和标签列表通过App\Http\ViewComposers\IndexComposer获取
        

        
        
        return view('Home/Index/index', [

                'articlesList' => $articlesList,

            ]);
    }





}
